<template>
  <div>
    <van-nav-bar
        title="评价页面"
        left-text="返回"
        right-text="按钮"
        left-arrow
        @click-left="onClickLeft"
        @click-right="onClickRight"
    />
    <van-divider>对商品的满意度</van-divider>
    <van-rate v-model="value1" icon="like" void-icon="like-o" style="margin-left: 140px" />
    <van-divider>对物流的满意度</van-divider>
    <van-rate v-model="value" allow-half void-icon="star" void-color="#eee" style="margin-left: 140px" />
    <van-divider>请提价评价</van-divider>
    <van-button color="linear-gradient(to right, #ff6034, #ee0a24)" style="margin-left: 150px" @click="onDialog">
      提交评价
    </van-button>
  </div>
</template>

<script>
import {Toast} from "vant";

import { Dialog } from 'vant';
export default {
  components: {
    [Dialog.Component.name]: Dialog.Component,
  },
  name: "assess",
  data() {
    return {
      value1: 3,
      value: 2.5,
    };
  },
  methods:{
    onDialog() {
      Dialog.alert({
        message: '谢谢您的评价,祝您生活愉快',
        theme: 'round-button',
      }).then(() => {
        // on close
      });
    },
    onClickLeft() {
      Toast('返回');
    },
    onClickRight() {
      Toast('按钮');
    },
  }
}
</script>

<style scoped>

</style>